/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.restinterface;

import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 *
 * @author osiris
 */

@Path("/Customer")  
public interface CustomerRestInterface {
    
       
    @POST
    @Path("/create")
    @Consumes(MediaType.APPLICATION_JSON)
    public void create(CustomerDTO customer);
    
    
    @GET
    @Path("/findall")
    @Produces(MediaType.APPLICATION_JSON)
    public List<CustomerDTO> findAll();
    
    @GET
    @Path("/findByFirstName/{firstName}")
    @Produces(MediaType.APPLICATION_JSON)
    public List<CustomerDTO> findByFirstName(@PathParam("firstName")String firstName);
    
    @GET
    @Path("/findById/{id}")
    @Produces(MediaType.APPLICATION_JSON)
    public CustomerDTO findById(@PathParam("id")String id);
    
    @DELETE
    @Path("/delete/{id}")
    public void delete(@PathParam("id")String id);
    
    @PUT
    @Path("/update")
    @Consumes(MediaType.APPLICATION_JSON)
    public void update(CustomerDTO customer);
    
    
    @GET
    @Path("/findByLastName/{lastName}")
    @Produces(MediaType.APPLICATION_JSON)
    public List<CustomerDTO> findByLastName(@PathParam("lastName")String lastName);
    
    @GET
    @Path("/findByEmail/{Email}")
    @Produces(MediaType.APPLICATION_JSON)
    public List<CustomerDTO> findByEmail(@PathParam("Email")String Email);
    
    @GET
    @Path("/findByPhoneNumber/{phoneNumber}")
    @Produces(MediaType.APPLICATION_JSON)
    public List<CustomerDTO> findByPhoneNumber(@PathParam("phoneNumber")String phoneNumber);
    
    
}